function x=unconstrain(x,xl,xu)
% reverse of constrain. constrains a number x in [xl,xu] to [- infty, + infty]
x=x-(xl+xu)/2;
x=tan(x*4*atan(1)/(xu-xl));